import sys

oldfile=sys.argv[1]

filename = [oldfile,
            ]
textset = set()


def quchong(filename):
    set1 = set()
    with open(filename, "r", encoding="utf-8") as r:
        r = r.readlines()
        for i in range(len(r)):
            # r[i] = r[i].split("@")
            print(i / len(r) * 100, "%")
            set1.add(r[i])
    return set1

for name in filename:
    textset = textset | quchong(name)

with open("C:\caoli\pycharm\project1\yueyu\\gd.txt","w",encoding="utf-8") as w:
    w.writelines(textset)
